#! /bin/bash

set -e

psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER"  <<-EOSQL
CREATE USER u_auth2;
CREATE DATABASE auth2_db;
GRANT ALL PRIVILEGES ON DATABASE auth2_db TO u_auth2;
EOSQL
